package com.mc.decisiontree;

public class DataType {
	private int[][] dataSet;
	private boolean[] mark;
	public DataType(int[][] dataSet){
		this.dataSet = dataSet;
		mark = new boolean[dataSet[0].length-1];
	}
	public int length(){
		return dataSet.length;
	}
	public int unMarkedLength(){
		int count=0;
		for(int i=0;i<mark.length;i++)
			if(mark[i]==false)
				count++;
		return count;
	}
	public int getLable(int i){
		if(i<dataSet.length)
			return dataSet[i][mark.length];
		return -1;
	}
	public int[] getRow(int i){
		if(i<dataSet.length)
			return dataSet[i];
		return null;
	}
	public int get(int i,int j){
		if(i<dataSet.length&&j<dataSet[0].length)
			return dataSet[i][j];
		return -1;
	}
	public boolean isMarked(int i){
		return mark[i];
	}
	public void mark(int i){
		mark[i] = true;
	}
}
